home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / smaltalk / st80_pr4.lha / st80_pre4 / MoDE / Recovery-Shan.st < prev    next >
Text File  |  1993-07-24  |  3KB  |  74 lines

  1. Object subclass: #Booter
  2.     instanceVariableNames: ''
  3.     classVariableNames: 'DirDelimiter '
  4.     poolDictionaries: ''
  5.     category: 'Recovery-Shan'!
  6. Booter comment:
  7. 'This is to fast recover from crashes.  Whenever you want to start a new image and fileIn all the code that you have done.  Open the fileList and file this class in.  The ''initialize'' class method will be executed automatically by Smalltalk interpreter and fileIn all the files.
  8.  
  9. December 18, 1988  Shan '!
  10.  
  11. "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
  12.  
  13. Booter class
  14.     instanceVariableNames: ''!
  15.  
  16.  
  17. !Booter class methodsFor: 'file in/out'!
  18.  
  19. fileAllOut
  20.     "This files out all categories that have a Shan postfix. Shan March 
  21.     8, 1990"
  22.     "self fileAllOut"
  23.  
  24.     | categories fileName aFileStream |
  25.     categories _ SystemOrganization categories select: [:each | 
  26.                     "Shan 8 May 1990"('*-Shan' match: each)
  27.                     | ('*-User' match: each)].
  28.     "categories add: 'Temporary-User'." "Shan 20 June 1990"
  29.     categories asOrderedCollection add: 'TestSNA-Lin'.
  30.     categories do: 
  31.         [:category | 
  32.         fileName _ category , '.st'.
  33.         aFileStream _ (Filename named: fileName) writeStream.
  34.         [SystemOrganization fileOutCategory: category on: aFileStream]
  35.             valueNowOrOnUnwindDo: [aFileStream close]]!
  36.  
  37. initialize
  38.     "Shan September 28, 1989"
  39.     "Modify to recognize different file naming conventions. Shan 8 May 
  40.     1990"
  41.     "Filename filesMatching: 'fileOuts/*-Shan.st' is a possibility but 
  42.     doesn't have the ordering. Some files may need to be filed in first. 
  43.     Shan 15 July 1990"
  44.  
  45.     | d |
  46.     d _ FileDirectory separatorString.
  47.     (Filename named: 'fileOuts' , d , 'InputSensor_class-install.st') fileIn.    "Shan 11 June 1990"
  48.     (Filename named: 'fileOuts' , d , 'DispObj-Shan.st') fileIn.
  49.     (Filename named: 'fileOuts' , d , 'Forms-Shan.st') fileIn.
  50.     (Filename named: 'fileOuts' , d , 'Modes-Shan.st') fileIn.
  51.     (Filename named: 'fileOuts' , d , 'TestMVC-Shan.st') fileIn.
  52.     (Filename named: 'fileOuts' , d , 'MMSOuterEnv-Shan.st') fileIn.
  53.     (Filename named: 'fileOuts' , d , 'EventTest-Shan.st') fileIn.
  54.     (Filename named: 'fileOuts' , d , 'PollingEnvModes-Shan.st') fileIn.
  55.     "(Filename named: 'fileOuts' , d , 'Goodies-Shan.st') fileIn."
  56.     (Filename named: 'fileOuts' , d , 'ITLibrary-Shan.st') fileIn.
  57.     (Filename named: 'fileOuts' , d , 'Examples-Shan.st') fileIn.
  58.     (Filename named: 'fileOuts' , d , 'NetworkMode-Shan.st') fileIn.
  59.     (Filename named: 'fileOuts' , d , 'Windowing-Shan.st') fileIn.
  60.     (Filename named: 'fileOuts' , d , '3DGame-Shan.st') fileIn.
  61.     (Filename named: 'fileOuts' , d , 'Resize-Shan.st') fileIn.
  62.     (Filename named: 'fileOuts' , d , 'Scroll-Shan.st') fileIn.
  63.     (Filename named: 'fileOuts' , d , 'Menu-Shan.st') fileIn.
  64.     (Filename named: 'fileOuts' , d , 'ModeEdit-Shan.st') fileIn.
  65.     (Filename named: 'fileOuts' , d , 'ModeComposer-Shan.st') fileIn.
  66.     (Filename named: 'fileOuts' , d , 'Temporary-User.st') fileIn.
  67.     (Filename named: 'fileOuts' , d , 'Comms-Shan.st') fileIn.
  68.     (Filename named: 'fileOuts' , d , 'TestSNA-Lin.st') fileIn.
  69.     (Filename named: 'fileOuts' , d , 'SEE-Shan.st') fileIn.
  70.     (Filename named: 'fileOuts' , d , 'TrackingReplay-Shan.st') fileIn.
  71.     MController initAllERDict! !
  72.  
  73. Booter initialize!
  74.